package org.come.shortcut;

import com.updateNew.MyIsif;
import org.come.Frame.DreamlandTrialMainJframe;
import org.come.Jpanel.DreamlandTrialMainJpanel;
import org.come.shortcut.XBjczJpanelxsjm;
import org.come.shortcut.XBjczJpanelzr;
import org.come.until.CutButtonImage;
import org.come.until.FormsManagement;

import javax.swing.*;
import java.awt.*;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;

//import static org.come.test.Main.imageMap;


public class XBjczJpanelxz implements MouseListener {

    private XBjczJpanelzr childCardJpanel;
    private int type;


    public XBjczJpanelxz(int type, XBjczJpanelzr childCardJpanel) {

        this.type = type;
        this.childCardJpanel = childCardJpanel;

    }

    @Override
    public void mouseClicked(MouseEvent e) {
        // TODO Auto-generated method stub

    }

    @Override
    public void mousePressed(MouseEvent e) {

        try {
            if("水墨UI".equals(MyIsif.getStyle())) {
                XBjczJpanelxsjm.getXBjczJpanelxsjm();
                XBjczJpanelxsjm.getXBjczJpanelxsjm().getXBjczJpanel();
                if (type == 1) {
                    childCardJpanel.getCar().show(childCardJpanel, "l1");
                    XBjczJpanelxsjm.getXBjczJpanelxsjm().getXBjczJpanel().getLabAttr()
                            .setIcons(CutButtonImage.cuts("skin/8100226/newbutton/K02.png"));
                    XBjczJpanelxsjm.getXBjczJpanelxsjm().getXBjczJpanel().getDreamlandTrialMain()
                            .setIcons(CutButtonImage.cuts("skin/8100226/newbutton/K03.png"));
//                    XBjczJpanelxsjm.getXBjczJpanelxsjm().getXBjczJpanel().getLadder()
//                            .setIcons(CutButtonImage.cuts("skin/8100226/newbutton/K73.png"));
                    XBjczJpanelxsjm.getXBjczJpanelxsjm().getXBjczJpanel().getLabTalent()
                            .setIcons(CutButtonImage.cuts("skin/8100226/newbutton/K75.png"));
                }
                if (type == 2) {
                    DreamlandTrialMainJpanel dreamlandTrialMainJpanel = DreamlandTrialMainJframe.getDreamlandTrialMainJframe().getDreamlandTrialMainJpanel();
                    dreamlandTrialMainJpanel.showLvlTier(dreamlandTrialMainJpanel.getPageNow());
                    childCardJpanel.getCar().show(childCardJpanel, "l2");
                    XBjczJpanelxsjm.getXBjczJpanelxsjm().getXBjczJpanel().getLabAttr()
                            .setIcons(CutButtonImage.cuts("skin/8100226/newbutton/K01.png"));
                    XBjczJpanelxsjm.getXBjczJpanelxsjm().getXBjczJpanel().getDreamlandTrialMain()
                            .setIcons(CutButtonImage.cuts("skin/8100226/newbutton/K04.png"));
//                    XBjczJpanelxsjm.getXBjczJpanelxsjm().getXBjczJpanel().getLadder()
//                            .setIcons(CutButtonImage.cuts("skin/8100226/newbutton/K73.png"));
                    XBjczJpanelxsjm.getXBjczJpanelxsjm().getXBjczJpanel().getLabTalent()
                            .setIcons(CutButtonImage.cuts("skin/8100226/newbutton/K75.png"));

                }
                if (type == 3) {
                    childCardJpanel.getCar().show(childCardJpanel, "l3");
                    ///  FormsManagement.showForm(2230);
                    XBjczJpanelxsjm.getXBjczJpanelxsjm().getXBjczJpanel().getLabAttr()
                            .setIcons(CutButtonImage.cuts("skin/8100226/newbutton/K01.png"));
                    XBjczJpanelxsjm.getXBjczJpanelxsjm().getXBjczJpanel().getDreamlandTrialMain()
                            .setIcons(CutButtonImage.cuts("skin/8100226/newbutton/K03.png"));
//                    XBjczJpanelxsjm.getXBjczJpanelxsjm().getXBjczJpanel().getLadder()
//                            .setIcons(CutButtonImage.cuts("skin/8100226/newbutton/K74.png"));
                    XBjczJpanelxsjm.getXBjczJpanelxsjm().getXBjczJpanel().getLabTalent()
                            .setIcons(CutButtonImage.cuts("skin/8100226/newbutton/K75.png"));
                    // FormsManagement.HideForm(3100);
                    // FormsManagement.showForm(624);
                }
                if (type == 4) {
                    childCardJpanel.getCar().show(childCardJpanel, "l4");
                    XBjczJpanelxsjm.getXBjczJpanelxsjm().getXBjczJpanel().getLabAttr()
                            .setIcons(CutButtonImage.cuts("skin/8100226/newbutton/K01.png"));
                    XBjczJpanelxsjm.getXBjczJpanelxsjm().getXBjczJpanel().getDreamlandTrialMain()
                            .setIcons(CutButtonImage.cuts("skin/8100226/newbutton/K03.png"));
//                    XBjczJpanelxsjm.getXBjczJpanelxsjm().getXBjczJpanel().getLadder()
//                            .setIcons(CutButtonImage.cuts("skin/8100226/newbutton/K73.png"));
                    XBjczJpanelxsjm.getXBjczJpanelxsjm().getXBjczJpanel().getLabTalent()
                            .setIcons(CutButtonImage.cuts("skin/8100226/newbutton/K76.png"));
                }
            } else {
                if (type == 1) {
                    childCardJpanel.getCar().show(childCardJpanel, "l1");
                    XBjczJpanelxsjm.getXBjczJpanelxsjm().getXBjczJpanel().getLabAttr()
                            .setIcons(CutButtonImage.cuts("skin/8100226/button/hongmu/K02h.png"));
                    XBjczJpanelxsjm.getXBjczJpanelxsjm().getXBjczJpanel().getDreamlandTrialMain()
                            .setIcons(CutButtonImage.cuts("skin/8100226/button/hongmu/ss678.png"));
//                    XBjczJpanelxsjm.getXBjczJpanelxsjm().getXBjczJpanel().getLadder()
//                            .setIcons(CutButtonImage.cuts("skin/8100226/button/hongmu/K73h.png"));
                    XBjczJpanelxsjm.getXBjczJpanelxsjm().getXBjczJpanel().getLabTalent()
                            .setIcons(CutButtonImage.cuts("skin/8100226/button/hongmu/ss680.png"));
                }
                if (type == 2) {
                    childCardJpanel.getCar().show(childCardJpanel, "l2");
                    XBjczJpanelxsjm.getXBjczJpanelxsjm().getXBjczJpanel().getLabAttr()
                            .setIcons(CutButtonImage.cuts("skin/8100226/button/hongmu/K01h.png"));
                    XBjczJpanelxsjm.getXBjczJpanelxsjm().getXBjczJpanel().getDreamlandTrialMain()
                            .setIcons(CutButtonImage.cuts("skin/8100226/button/hongmu/ss677.png"));
//                    XBjczJpanelxsjm.getXBjczJpanelxsjm().getXBjczJpanel().getLadder()
//                            .setIcons(CutButtonImage.cuts("skin/8100226/button/hongmu/K73h.png"));
                    XBjczJpanelxsjm.getXBjczJpanelxsjm().getXBjczJpanel().getLabTalent()
                            .setIcons(CutButtonImage.cuts("skin/8100226/button/hongmu/ss680.png"));
                }
                if (type == 3) {
                    childCardJpanel.getCar().show(childCardJpanel, "l3");
                    XBjczJpanelxsjm.getXBjczJpanelxsjm().getXBjczJpanel().getLabAttr()
                            .setIcons(CutButtonImage.cuts("skin/8100226/button/hongmu/K01h.png"));
                    XBjczJpanelxsjm.getXBjczJpanelxsjm().getXBjczJpanel().getDreamlandTrialMain()
                            .setIcons(CutButtonImage.cuts("skin/8100226/button/hongmu/ss678.png"));
//                    XBjczJpanelxsjm.getXBjczJpanelxsjm().getXBjczJpanel().getLadder()
//                            .setIcons(CutButtonImage.cuts("skin/8100226/button/hongmu/K74h.png"));
                    XBjczJpanelxsjm.getXBjczJpanelxsjm().getXBjczJpanel().getLabTalent()
                            .setIcons(CutButtonImage.cuts("skin/8100226/button/hongmu/ss680.png"));
                }
                if (type == 4) {
                    childCardJpanel.getCar().show(childCardJpanel, "l4");
                    XBjczJpanelxsjm.getXBjczJpanelxsjm().getXBjczJpanel().getLabAttr()
                            .setIcons(CutButtonImage.cuts("skin/8100226/button/hongmu/K01h.png"));
                    XBjczJpanelxsjm.getXBjczJpanelxsjm().getXBjczJpanel().getDreamlandTrialMain()
                            .setIcons(CutButtonImage.cuts("skin/8100226/button/hongmu/ss678.png"));
//                    XBjczJpanelxsjm.getXBjczJpanelxsjm().getXBjczJpanel().getLadder()
//                            .setIcons(CutButtonImage.cuts("skin/8100226/button/hongmu/K73h.png"));
                    XBjczJpanelxsjm.getXBjczJpanelxsjm().getXBjczJpanel().getLabTalent()
                            .setIcons(CutButtonImage.cuts("skin/8100226/button/hongmu/ss679.png"));
                }
            }
        } catch (Exception e1) {
            // TODO Auto-generated catch block
            e1.printStackTrace();
        }
    }

    @Override
    public void mouseReleased(MouseEvent e) {
        // TODO Auto-generated method stub

    }

    @Override
    public void mouseEntered(MouseEvent e) {
        // TODO Auto-generated method stub

    }

    @Override
    public void mouseExited(MouseEvent e) {
        // TODO Auto-generated method stub

    }

}
